<layout:sign/>

<body class="hold-transition lockscreen">
<!-- Automatic element centering -->
<div class="lockscreen-wrapper">
    <div class="lockscreen-logo">
        <a href="#"><b>Admin</b>LTE</a>
    </div>
    <!-- User name -->
    <div class="lockscreen-name">John Doe</div>

    <!-- START LOCK SCREEN ITEM -->
    <div class="lockscreen-item">
        <!-- /.lockscreen-image -->

        <!-- lockscreen credentials (contains the form) -->
        <form class="lockscreen-credentials">
            <div class="input-group">
                <input type="email" id="email" class="form-control" placeholder="Input email here">

                <div class="input-group-btn">
                    <button type="button" id="submit" class="btn"><i class="fa fa-arrow-right text-muted"></i></button>
                </div>
            </div>
        </form>
        <!-- /.lockscreen credentials -->

    </div>
    <!-- /.lockscreen-item -->
    <div class="help-block text-center">
        Enter your password to retrieve your session
    </div>
    <div class="text-center">
        <a href="__PUBLIC__/admin/sign/in">Or sign in as a different user</a>
    </div>
    <div class="lockscreen-footer text-center">
        Copyright &copy; 2014-2016 <b><a href="http://almsaeedstudio.com" class="text-black">Almsaeed Studio</a></b><br>
        All rights reserved
    </div>
</div>
<!-- /.center -->
<script>

    isea.ready(function () {
        $("#submit").click(function () {
            var email = $("#email").val();
            if (!email) {
                return isea.notify.show('请填写邮箱');
            }
            $.get("__PUBLIC__/admin/sign/forgot", {
                email: email,
                token: "{{token}}"
            }, function (data) {
                isea.notify.show(data.message);
                if (data.status) {
                    if (data.redirect) location.href = data.redirect;
                }
            });
        });
    });

</script>
</body>
